# encoding: utf-8
"""
@author: Dirac
@file: bootstrap.py
@time: 2020/7/31 10:23
@desc:
"""


class BootStrapForm():
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        for name, field in self.fields.items():  # name 是字段名, field 是字段值
            field.widget.attrs['class'] = 'form-control'
            field.widget.attrs['placeholder'] = '请输入%s' % (field.label,)
